package com.youlai.boot.system.controller;
import com.youlai.boot.common.result.Result;
import com.youlai.boot.system.model.vo.TagsVO;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * 文章分类控制器
 * @author haoxr
 * @since 2020/11/6
 */
@Tag(name = "08.文章分类接口")
@RestController
@RequestMapping("/api/v1/articletags")
@RequiredArgsConstructor
public class TagsController {
    private final com.youlai.boot.system.service.TagsService TagsService;
    @Operation(summary = "热门文章列表")
    @GetMapping("/list")
    public Result<List<TagsVO>> getTags() {
        List<TagsVO> tags = TagsService.getTags();
        return Result.success(tags);
    }
}